#!/bin/bash

set -x

sudo tunctl -u $(id -un) -t $1
sudo ifconfig $1 192.168.3.$(expr 200 + ${1: 3}) promisc arp up
sudo brctl addbr br0
sudo brctl addif br0 $1
brctl show

sudo ifconfig br0 192.168.3.1/24 promisc arp up

